package com.example.demo.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController    //该注解为组合注解，等同于Spring中@Controller+@ResponseBody注解
public class HelloController {
	@GetMapping("/hello")   //该注解等同于Spring中@RequestMapping(RequestMethod.GET)
	public String hello() {
		return "Hello,Spring Boot!";
	}
}
